## --------------------------------------------------------------------
## ykit FABase
## --------------------------------------------------------------------


    set(SOURCES_files_SourceFiles
      AutoPt.cpp
      mempool.cpp
	  thread.cpp
      thread_pool.cpp
	  Codec.cpp
	  tools.cpp
	  ${PROJECT_SOURCE_DIR}/inc/FABase/tools.h
	  StringUtil.cpp
	  date.cpp
	  ${PROJECT_SOURCE_DIR}/inc/FABase/date.h
	  ${PROJECT_SOURCE_DIR}/inc/FABase/Log.h
	  time_util.cpp
	  ${PROJECT_SOURCE_DIR}/inc/FABase/time_util.h
	  Log.cpp
	  ${PROJECT_SOURCE_DIR}/inc/FABase/safe_vector.h
    )
    source_group("Source Files" FILES ${SOURCES_files_SourceFiles})

    set(SOURCES_SourceFiles
      ${SOURCES_files_SourceFiles}
    )


  set(SOURCES_
    ${SOURCES_SourceFiles}
  )
  
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/inc/)

  if(WIN32)	
   SET(CMAKE_CXX_FLAGS_DEBUG "/MDd /Z7 /Od")
   SET(CMAKE_CXX_FLAGS_RELEASE "/MD /O2")
   SET(CMAKE_CXX_FLAGS_MINSIZEREL "/MD /O2")
   SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/MDd /Z7 /Od")
   #set(CMAKE_C_FLAGS_DEBUG_INIT "/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1") 
endif(WIN32)

SET(ProjectName FABase)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib/)
Add_Definitions(-DUNICODE -D_UNICODE)

ADD_LIBRARY(${ProjectName} STATIC ${SOURCES_})

if(NOT WIN32)
add_definitions(-D_PORT_VERSION -Wno-deprecated  -fPIC)
if(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE STREQUAL "Release" OR "MinSizeRel" OR "RelWithDebInfo")
add_definitions(-DNDEBUG)
endif(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE STREQUAL "Release" OR "MinSizeRel" OR "RelWithDebInfo")
endif(NOT WIN32)
